//
//  EYMethod.h
//  metadata
//
//  Created by easy on 11-5-27.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/objc-runtime.h>
#import "EYMetadata.h"
#import "EYSelector.h"

#ifndef METHOD_RETURN_TYPE_SIZE
#define METHOD_RETURN_TYPE_SIZE 256
#endif
@interface EYMethod : NSObject {
	Method own;
}
//method_setImplementation method_getImplementation
@property (nonatomic, readwrite) IMP implementation;
@property (nonatomic, readonly) Method ownMethod;
//method_getName
@property (nonatomic, readonly) EYSelector *name;
//method_getNumberOfArguments
@property int numberOfArguments;
//method_getReturnType
@property (nonatomic, readonly) NSString *returnType;
//method_getTypeEncoding
@property (nonatomic, readonly) NSString *typeEncoding;

-(id) initWith:(Method) method;
+(id) init:(Method) method;
//method_getArgumentType
-(NSString *) argumentTypeAtIndex:(NSUInteger) index;
//method_exchangeImplementations
+(void) exchange:(EYMethod *) method1 with:(EYMethod *) method2;
-(void) exchangeWith:(EYMethod *) method;
//method_copyArgumentType
-(NSString *) copyArgumentTypeAtIndex:(NSUInteger) index;
//method_copyReturnType
-(NSString *) copyReturnType;
@end
